<?php require('../data/dbcon.php'); ?>
<?php require('../data/functions.php'); ?>
<?php
session_start();
$UserChk = checkUser($_COOKIE['winnguestbook_u'], $_COOKIE['winnguestbook_auth']);
if( $UserChk == FALSE ) {
	header("location: index.php");
}
	//include 'class/winnscriptatype.php';
	//$w = new WinnScriptatype();
?>
<?php

if( !empty($_GET['approve']) ) {
	$approvepost = approvePost($_GET['approve']);
	header("location: admin.php");
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">@import url('css/admin.css'); </style>
<script type="text/javascript" src="js/prototypejs.js"></script>
<script type="text/javascript" src="js/scriptaculous.js"></script>
<title>Winn Guestbook <?=$version; ?></title>
</head>

<body>
<div id="adminheader">
	<?php include('inc/sitename.php'); ?>
    <ul id="dash">
<?php include('inc/header.php'); ?>

<div class="content">
        
        <?php echo getNewPosts(); ?>
        
        <div id="winnfeed">
        <!--Thank you for downloading the guestbook!-->
        <?php include('inc/rss2html.php'); ?>
        </div>
    
</div>
<?php include('inc/footer.php');?>
</body>
</html>
